package org.szx.utils;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

public class MD5Utils {
	 public static String GetMD5Code(String pwd) {
	    	String resultString = null;
	    	try {
	    		resultString = new String(pwd);
	    		MessageDigest md = MessageDigest.getInstance("MD5");
			} catch (NoSuchAlgorithmException e) {
				// TODO: handle exception
				e.printStackTrace();
			}
	    	return resultString;
	    }
		
	    /**
	     * @param args
	     */
	    public static String byteToString(byte [] buffer){
	    	StringBuilder builder  = new StringBuilder();
	    	for(int i = 0;i<buffer.length;i++){
	    		builder.append(buffer[i]);
	    	}
	    	return builder.toString();
	    }
}
